import request,{mockRequest} from '@/utils/request';

export async function getMyInfo() {
  return request('/user/my');
}

export async function getUserBrief(id) {
  return request(`/user?id=${id}`);
}

export async function getMyDetail(id) {
  return request(`/user/my/detail`);
}

export async function updatePassword(data) {
  return request(`/user/setting/password`, {
    method: 'POST',
    data:data
  });
}

export async function updateUser(data) {
  return request(`/user`, {
    method: 'POST',
    data:data
  });
}

export async function updateUsername(data) {
  return request(`/user/username`, {
    method: 'POST',
    data:data
  });
}

export async function addTag(data){
  return request(`/user/tag`, {
    method: 'POST',
    data:data
  });
}

export async function removeTag(id){
  return request(`/user/tag/${id}`, {
    method: 'DELETE',
  });
}

export async function registerEmail(data) {
  return request(`/user/register/email`, {
    method: 'POST',
    data:data
  });
}




